<template>
  <div>
    <homePanel title="最新好物" subTitle="最新好物"></homePanel>
    <ul class="item">
      <li v-for="good in goods" :key="good.id">
        <homeGoods :good='good'></homeGoods>
      </li>
    </ul>
  </div>
</template>

<script>
import homeGoods from './home-goods.vue'
import homePanel from './home-panel.vue'
import { findSpecial } from '../../../api/home'
import { ref } from 'vue'
export default {
  name: 'HomeGoodsGroup',
  components: { homeGoods, homePanel },
  setup () {
    const goods = ref([])
    findSpecial().then(data => {
      goods.value = data.result
    })
    return { goods }
  }
}
</script>
<style lang="less" scoped>
.item{
  display: flex;
}
li{
  // width: 306px;
  margin-right: 10px;
}
</style>
